package scau.filesystem.view;

import javafx.fxml.FXML;
import javafx.scene.control.TextArea;
import javafx.stage.Stage;

public class WriteFileMessageDialogController {
	@FXML
	private TextArea messageTextArea;
	private Stage dialogStage;
	private String message="";
	private boolean OKClick=false;
	@FXML
    private void initialize() {
    }
    public void setDialogStage(Stage dialogStage) {
        this.dialogStage = dialogStage;
    }
    @FXML
    public void handleOk(){
    	message=this.messageTextArea.getText();
    	OKClick=true;
    	this.dialogStage.close();
    }
    @FXML
    public void handleCancel(){
    	this.dialogStage.close();
    }
    public String isOKClicked(){
    	if(OKClick)
    		return message;
		return "";   	
    }
}
